#ifndef QPOLYGONWIDGET_H
#define QPOLYGONWIDGET_H

#include "../widgets/qwidgethost.h"

#include <QWidget>

class QPolygonWidget : public QWidget
{
    Q_OBJECT
    Q_PROPERTY(int line_width READ lineWidth WRITE setLineWidth)
public:
    explicit QPolygonWidget(QWidget *parent = 0);

    int     lineWidth();
    void    setLineWidth(int lineWidth);
protected:
    void    paintEvent(QPaintEvent *);
signals:

public slots:
protected:
    int     m_line_width;
};

class QPolygonWidgetHost : public QWidgetHost
{
    Q_OBJECT
public:
    Q_INVOKABLE QPolygonWidgetHost(QAbstractHost *parent = 0);

    static QString get_show_name();
    static QString get_show_icon();
    static QString get_show_group();

public slots:
    int     lineWidth();
    void    setLineWidth(int lineWidth);

    int     lineStyle();
    void    setLineStyle(int lineStyle);
protected:
    void    init_property();
protected:
    void    create_object();
};

#endif // QPOLYGONWIDGET_H
